<script type="text/javascript">
var successFun=function(res){
if(res.code==200){
	alert('更新成功！');
}
}
$(document).ready(function() { 
	var updateOptions	= {dataType:'json',error:doError,success:doSuccess}
    $('#form').ajaxForm(updateOptions); 
}); 
</script>
<div id="content">
<form id="form" action="{url('Site','SaveCache')}" method="post">
<h3 class="title">缓存设置</h3>
<table class="admin-table">
	<tr>
	<td>列表页缓存开启</td>
	<td>
<input name="listcacheenable" id="listcacheenable" type="checkbox" value="1" {if $this->data['cache']['listcacheenable']}checked{/if} /><span etype='error_info' class="error_info"id="listcacheenable_info"></span>
	</td>
	</tr>
	<tr>
	<td>详情页缓存开启</td>
	<td>
<input name="detailcacheenable" id="detailcacheenable" type="checkbox" value="1" {if $this->data['cache']['detailcacheenable']}checked{/if} /><span etype='error_info' class="error_info"id="detailcacheenable_info"></span>
	</td>
	</tr>
	<tr>
	<td>列表页缓存周期</td>
	<td>
<input name="listcacheperiod" id="listcacheperiod" type="text" value="{$this->data['cache']['listcacheperiod']}" /><span etype='error_info' class="error_info"id="listcacheperiod_info">单位天，超过设定的天数后将重新请求API获取数据</span>
	</td>
	</tr>
	<tr>
	<td>详情页缓存周期</td>
	<td>
<input name="detailcacheperiod" id="detailcacheperiod" type="text" value="{$this->data['cache']['detailcacheperiod']}" /><span etype='error_info' class="error_info"id="detailcacheperiod_info">单位天，超过设定的天数后将重新请求API获取数据</span>
	</td>
	</tr>
	<tr>
	<td>缓存目录大小</td>
	<td>
<input name="maxdirsize" id="maxdirsize" type="text" value="{$this->data['cache']['maxdirsize']}" /><span etype='error_info' class="error_info"id="maxdirsize_info">单位M，当缓存文件占用的空间超过这个设置，系统会提醒你清除缓存文件</span>
	</td>
	</tr>
	<tr><td colspan="2"><input id="btnSave" type="submit" value="保存" /></td></tr>
</table>
</form>
</div>